//
//  CoreDataManager.h
//  UseData
//
//  Created by Lenny on 16/5/16.
//  Copyright © 2016年 Lenny. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AppDelegate.h"

@interface CoreDataManager : NSObject

@property(nonatomic,retain)AppDelegate* myAppDelegate;
//单列
+ (instancetype)share;

//根据enityName设置模型
- (id)setEnityWithString:(NSString *)enityName;

//根据sql条件查看数据，返回为数组 sqlStr:为sql语句
- (id)checkWithEnity:(NSString *)enityName withSql:(NSString *)sqlStr;
//根据条件查找要删除数据，返回为nil sqlStr:为sql语句
- (void)deleteWithEnity:(NSString *)enityName withSql:(NSString *)sqlStr;

//存储数据
- (void)saveData;

@end
